<template>
  <div class="bz-footer">
    <van-tabbar v-model="tabindex">
      <van-tabbar-item
        v-for="tabbar in tabbars"
        :key="tabbar.name"
        :icon="tabbar.meta.icon"
        :to="tabbar.path"
      >
        {{tabbar.meta.title}}
      </van-tabbar-item>
    </van-tabbar>
  </div>
</template>

<script>
import routes from '../router/routes.js'
export default {
  name: 'Footer',
  data () {
    return {
      tabindex: 0
    }
  },
  created () {
    console.log(this.tabbars)
  },
  computed: {
    tabbars () {
      return routes.filter(route => route.meta.isFooter)
    }
  }
}
</script>

<style lang="scss" scoped>
.bz-footer{
  height: 50px;
}
</style>
